package com.project.dto.request.cmd;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
public class CmdRegister {
    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不可为空")
    private String username;

    @ApiModelProperty("真实姓名")
    @NotBlank(message = "真实姓名不可为空")
    private String realName;

    @ApiModelProperty("密码")
    @NotBlank(message = "注册密码不可为空")
    @Size(min = 6,message = "用户输入的密码长度必须不少于6位")
    private String password;

    @ApiModelProperty("手机号")
    @NotNull(message = "用户输入的手机号不可为空")
    @Size(max = 11,min = 11,message = "手机号必须为11位")
    private String phone;

    @ApiModelProperty("级别(1：低年级；2：高年级)")
    @NotBlank(message = "用户级别不可为空")
    private String grade;
}
